package com.szly.phm.common.service;

import com.szly.phm.common.entity.dto.FaFault.*;
import com.szly.phm.common.entity.dto.ensure.*;
import com.szly.phm.common.entity.dto.user.LoginUserDTO;
import com.szly.phm.common.entity.result.PageResult;
import com.szly.phm.common.entity.result.RootResponse;
import com.szly.phm.common.entity.vo.Fault.FaPhenomenonRecordVO;
import com.szly.phm.common.entity.vo.Fault.FaPhenomenonVO;
import com.szly.phm.common.entity.vo.ensure.*;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Lenovo
 * @since 2021-10-16
 */
public interface IEnsureService{


    // query the structure id follows the ensure and ensureType ids;
    RootResponse<EnsureEnsureType2StructureVO> queryEnsureEnsureType2Structure(EnsureEnsureType2StructurePageDTO ensureEnsureType2StructurePageDTO);

    // query the structure id follows the extension and system ids;
    RootResponse<FaEnsure2StructureVO> queryEnsure2Structure(EnsureStructurePageDTO ensureStructurePageDTO);

    RootResponse createStructure2EnsurePlan(CreateStructureEnsureDTO createStructureEnsureDTO,LoginUserDTO loginUserDTO);

    /**
     * for the taskLevel 任务级别管理
     * @param
     * @return
     */
    // query
    RootResponse<PageResult<FaTaskLevelVO>> queryFaTaskLevelPage(FaTaskLevelPageDTO faTaskLevelPageDTO);

    // add
    RootResponse createFaTaskLevel(CreateFaTaskLevelDTO createFaTaskLevelDTO, LoginUserDTO userDTO);

    // update
    RootResponse updateFaTaskLevel(UpdateFaTaskLevelDTO updateFaTaskLevelDTO, LoginUserDTO userDTO);

    // delete
    RootResponse deleteFaTaskLevel(String id, LoginUserDTO userDTO);


    /**
     * @description : TODO
     * @param faEnsureTypePageDTO
     * @return : com.szly.phm.common.entity.result.RootResponse<com.szly.phm.common.entity.result.PageResult<com.szly.phm.common.entity.vo.ensure.FaEnsureTypeVO>>
     * @author : git.jas0nch
     * date : 2021/12/19
     **/
    // query
    RootResponse<PageResult<List<FaEnsureTypeVO>>> queryFaEnsureTypePage(EnsureTypePageDTO faEnsureTypePageDTO);
// query
    List<FaEnsureTypeVO> recursionEnsureTypeWithName(String id, List<FaEnsureTypeVO> faEnsureTypeVOS, String queryName);

    List<FaEnsureTypeVO> recursionEnsureType(String id, List<FaEnsureTypeVO> faEnsureTypeVOS);

    // add
    RootResponse createFaEnsureType(CreateEnsureTypeDTO createFaEnsureTypeDTO, LoginUserDTO userDTO);

    // update
    RootResponse updateFaEnsureType(UpdateEnsureTypeDTO updateFaEnsureTypeDTO, LoginUserDTO userDTO);

    // delete
    RootResponse deleteFaEnsureType(String id, LoginUserDTO userDTO);

    /**
     * 保障基础表
     */
    // query
    RootResponse<PageResult<FaEnsureVO>> queryFaEnsurePage(EnsurePageDTO ensureDTO);

    // add
    RootResponse createEnsure(CreateEnsureDTO createEnsureDTO, LoginUserDTO userDTO);

    // update
    RootResponse updateEnsure(UpdateEnsureDTO updateEnsureDTO, LoginUserDTO userDTO);

    // delete
    RootResponse deleteEnsure(String id, LoginUserDTO userDTO);

    /**
     * 保障计划
     */
    // query
    RootResponse<PageResult<FaEnsurePlanVO>> queryFaEnsurePlanPage(EnsurePlanDTO ensurePlanDTO, LoginUserDTO userDTO);

    // add
    RootResponse createEnsurePlan(CreateEnsurePlanDTO createEnsurePlanDTO, LoginUserDTO userDTO);

    // update
    RootResponse updateEnsurePlan(UpdateEnsurePlanDTO updateEnsurePlanDTO, LoginUserDTO userDTO);

    // delete
    RootResponse deleteEnsurePlan(String id, LoginUserDTO userDTO);

    /**
     * 保障记录
     */
    // query
    RootResponse<PageResult<FaEnsureRecordVO>> queryFaEnsureRecordPage(EnsureRecordPageDTO ensureRecordPageDTO, LoginUserDTO userDTO);

    // add
    RootResponse createEnsureRecord(CreateEnsureRecordDTO createEnsureRecordDTO, LoginUserDTO userDTO);

    // update
    RootResponse updateEnsureRecord(UpdateEnsureRecordDTO updateEnsureRecordDTO, LoginUserDTO userDTO);

    // delete
    RootResponse deleteEnsureRecord(String id, LoginUserDTO userDTO);

    /**
     * 保障方法
     */
    // query
    RootResponse<PageResult<FaEnsureWaysVO>> queryFaEnsureWaysPage(EnsureWaysPageDTO ensureWaysPageDTO);

    // add
    RootResponse createEnsureWays(CreateEnsureWaysDTO createEnsureWaysDTO, LoginUserDTO userDTO);

    // update
    RootResponse updateEnsureWays(UpdateEnsureWaysDTO updateEnsureWaysDTO, LoginUserDTO userDTO);

    // delete
    RootResponse deleteEnsureWays(String id, LoginUserDTO userDTO);

    /**
     * 故障信息
     */
    // query
    RootResponse<PageResult<FaPhenomenonVO>> queryFaPhenomenonPage(FaPhenomenonPageDTO phenomenonPageDTO);

    // add
    RootResponse createFaPhenomenon(CreateFaPhenomenonDTO createFaPhenomenonDTO, LoginUserDTO userDTO);

    // update
    RootResponse updateFaPhenomenon(UpdateFaPhenomenonDTO updateFaPhenomenonDTO, LoginUserDTO userDTO);

    // delete
    RootResponse deleteFaPhenomenon(String id, LoginUserDTO userDTO);

    /**
     * 故障现象
     */
    // query
    RootResponse<PageResult<FaPhenomenonRecordVO>> queryFaPhenomenonRecordPage(FaPhenomenonRecordPageDTO phenomenonRecordPageDTO);

    // add
    RootResponse createFaPhenomenonRecord(CreateFaPhenomenonRecordDTO createFaPhenomenonRecordDTO, LoginUserDTO userDTO);

    // update
    RootResponse updateFaPhenomenonRecord(UpdateFaPhenomenonRecordDTO updateFaPhenomenonRecordDTO, LoginUserDTO userDTO);

    // delete
    RootResponse deleteFaPhenomenonRecord(String id, LoginUserDTO userDTO);
}
